//
//  WSTabBarControllerViewController.m
//  WeiboSpace
//
//  Created by nan4 li on 12-4-27.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "WSTabBarController.h"

@interface WSTabBarController ()

@end

@implementation WSTabBarController

-(id)init
{
    if (self == [super init]) {
        
        //self.view.backgroundColor = [UIColor blueColor];
        WSTabBarView *tabBarView = [[WSTabBarView alloc]initWithFrame:CGRectMake(0, 480-49, 480, 49)]; 
        [self.view addSubview:tabBarView];
        [tabBarView release];
        tabBarView._delegate = self;
        self.tabBar.hidden = YES;
        
    }
    return self;
}


- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

-(void)tabBarItemSelected:(id)sender didselectItem:(NSInteger)itemIndex;
{
    self.selectedIndex = itemIndex;
    self.tabBar.hidden = YES;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
